Media content is used in a variety of real-world applications today. Examples of media content can be audio and video files. There are certain features associated with the production and broadcasting of media content. Due to the use of new technologies, evolving industry standards and the use of open architecture in the development of media content, verification of features associated with the production and broadcasting of media content is essential for ensuring quality broadcasting of media content. As a result, media content developers, providers, broadcasters and operators need to carry out quality checks to verify media content.
Compression techniques are widely used to capture and transmit media content, especially digital video. Block-based transform coding is one of the compression techniques used in which each image frame of a digital video file is decomposed into rectangular regions called blocks and are transform coded. These image frames are then transmitted to a receiver. At the receiver, the coded frames are decoded and the blocks are re-assembled to reconstruct the image. A commonly used transform-coding technique is the Discrete Cosine Transform (DCT). One of the disadvantages of coding by using a block-based DCT transform is that the image is degraded during the coding process at high compression ratios. This is because the quantization noise is generally correlated within each block but not with other blocks. Consequently, the decoded image at the receiver shows discontinuities (image intensity variation) near the adjacent block boundaries. This feature is known as blockiness and is the most common distortion effect in block-based compression techniques, e.g., JPEG, MPEGx and H.26x. Detection of blockiness is one of the most important quality checks related to digital capture and transmission of the images of video files
A method for detecting and measuring blockiness is described in the non-patent reference: “Image Blockiness Evaluation Based on Sobel Operator” by C. Perra, F. Massidda and D. D. Giusto. This paper appears in ICIP 2005, International Conference on Image Processing, 2005: Genoa, Italy; Publication date: 11-14 Sep. 2005. The following paragraph describes the method followed in this reference to detect and measure blockiness.
A convolution process is performed between the luma part of an image and the two Sobel masks Mx and My, which are defined as follows:Mx[3][3]={{−1,0,1},{−2,0,2},{−1,0,1}};My[3][3]={{−1,−2,−1},{0,0,0},{1,2,1}}.The luma part of the image is the achromatic part of the image that is used for determining blockiness in the image. The convolution process is a mathematical operation used by a discrete differentiation operator to calculate 2-dimensional approximations of gradients of image intensity at each pixel point of a digital image. The discrete differentiation operator is known as the Sobel operator. In mathematical terms, the gradient of image intensity at each pixel point is a vector pointing in the direction of largest possible intensity increase and having a length specifying the rate of change of intensity in that direction. Gradient approximation at each pixel point is specified by two values: an approximate value of the derivative of image intensity in the horizontal direction and an approximate value of the derivative of image intensity in the vertical direction. The Sobel operator operates the two Sobel masks Mx [3][3] and My [3][3] on each pixel point to calculate gradient values corresponding to the pixel point in the horizontal and vertical direction respectively. Mx and My are 3×3 discrete filters which are convolved with a two-dimensional array containing a pixel point value and 8 pixel point values around it for calculating the gradient values corresponding to that pixel point.
The gradient values for a pixel point (i,j) of an image I are calculated as follows:
Gradient value of image intensity in the horizontal direction Dx(i,j)=I(i,j)*Mx(i,j)
Gradient value of image intensity in the vertical direction Dy(i,j)=I(i,j)*My(i,j) where * is the convolution operator. Finally, gradient values for the entire image I in the horizontal and vertical direction are obtained as multi-dimensional arrays Dx and Dy respectively. Dx and Dy are then divided into N×N blocks (N=8) to determine blockiness caused by an 8×8 DCT transform. A blockiness detection algorithm is then applied to each block to calculate a blockiness index for the block. The blockiness index is a combination of two measures. The first measure quantifies the intensity variation of pixels at the block boundary. The second quantifies the intensity variation of pixels inside the block.
The intensity variation measures are calculated as follows:
            s      1        =                  1        N            ⁢              {                                            ∑                                                (                                      i                    ,                    j                                    )                                ∈                                  Ω                                      1                    ⁢                    V                                                                        ⁢                                                                                                D                    x                                    ⁡                                      (                                          i                      ,                      j                                        )                                                                                              max                ⁡                                  (                                      D                    x                                    )                                                              +                                    ∑                                                (                                      i                    ,                    j                                    )                                ∈                                  Ω                                      1                    ⁢                    H                                                                        ⁢                                                                                                D                    y                                    ⁡                                      (                                          i                      ,                      j                                        )                                                                                              max                ⁡                                  (                                      D                    y                                    )                                                                    }                        s      2        =                  1                  N          2                    ⁢                        ∑                                    (                              i                ,                j                            )                        ∈                          Ω              2                                      ⁢                              D            ⁡                          (                              i                ,                j                            )                                            max            ⁡                          (              D              )                                          where s1 signifies the intensity variation at the block boundary, s2 signifies the intensity variation inside the block, Ω1V denotes the pixels along the vertical boundaries of the block, Ω1H the pixels along the horizontal boundaries of the block and Ω2 the inner pixels of the block,
D(i,j)=√{square root over (Dx(i,j)2+Dy(i,j)2)}{square root over (Dx(i,j)2+Dy(i,j)2)} is the gradient magnitude at the pixel point (i,j), and N, N2 are two normalization factors. (N, N2 are the number of elements in the sums s1 and s2).
Once s1 and s2 are calculated, S, which is the blockiness index for the block, is calculated by using the following formula:
  S  =                                  s          1          λ                -                  s          2          λ                                      s          1          λ                +                  s          2          λ                        
Thus blockiness index for each block is calculated and a final blockiness value for the image is calculated using the blockiness indexes of all the blocks.
However, the formula given above does not provide accurate measures of s1 and s2. In some conditions, for example, when the intensity variations of pixels inside and outside the block are low, the value of the blockiness index calculated by the formula given above is incorrect or indeterminate. Additionally, if there is true intensity variation at the block boundary or inside the block, the formula gives inaccurate results. Based on the above, there is need for a method to accurately detect and quantify blockiness in a video file.